<script setup>
import { ElContainer, ElHeader, ElAside, ElMenu, ElMenuItem } from 'element-plus';
</script>

<template>
  <div>
    <el-container style="height: 100%;">
      <el-header></el-header>
      <el-container>
        <el-aside width="200px">
          <el-row class="tac">
            <el-col :span="24">
              <el-menu
                  default-active="2"
                  class="el-menu-vertical-demo"
                  router
              >
                <el-sub-menu index="1">
                  <template #title>
                    <el-icon><Menu /></el-icon>
                    <span>个人信息管理</span>
                  </template>
                    <el-menu-item index="/page1"><el-icon><ShoppingCart/></el-icon>购物车管理</el-menu-item>
                    <el-menu-item index="/page2"><el-icon><User /></el-icon>学生信息管理</el-menu-item>
                </el-sub-menu>
                <el-sub-menu index="2">
                  <template #title>
                    <el-icon><Menu /></el-icon>
                    <span>一级导航2</span>
                  </template>
                  <el-menu-item index="/page3">二级导航1</el-menu-item>
                  <el-menu-item index="/page4">二级导航2</el-menu-item>
                </el-sub-menu>
                <el-sub-menu index="3">
                  <template #title>
                    <el-icon><Menu /></el-icon>
                    <span>一级导航3</span>
                  </template>
                  <el-menu-item index="/page5" disabled>二级导航1</el-menu-item>
                  <el-menu-item index="/page6" disabled>二级导航2</el-menu-item>
                </el-sub-menu>
              </el-menu>
            </el-col>
          </el-row>

        </el-aside>
        <el-main><router-view></router-view></el-main>
      </el-container>
    </el-container>
  </div>
</template>

<style scoped>
.el-header, .el-footer {
  background-color: #b3c0d1;
  color: #333;
  text-align: center;
  line-height: 60px;
}

.el-aside {
  background-color: #f8f6f6;
  color: #333;
  text-align: center;
  line-height: 200px;
}

.el-main {
  height: 100vh;
  background-color: #e9eef3;
  color: #333;
}
</style>
